package java_0629;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadDemo23 {
    public static void main(String[] args) {
        //使用以下标准库中的线程池
        //先创建出一个线程池的实例
        ExecutorService service = Executors.newFixedThreadPool(10);
        for(int i=0;i<10;i++){
            service.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("hello");
                }
            });

        }
    }
}
